<?php
class Orden extends Modelo_base {

	var $table = 'ordenes';

	//var $has_one = array('fluido');

    // Validaciones de campos
    var $validation = array(
       
        'litros' => array(
            'label' => 'Litros',
            'rules' => array('required','float'),
            'get_rules' => array('float')
            ),
        'fluidos_idFluido' => array(
            'label' => 'Fluido',
            'rules' => array('boolean')
            ),
        'fecha' => array(
            'label' => 'Fecha',
            'rules' => array('required', 'prepararFecha' => 'Y-m-d H:i', 'valid_date'),
            'get_rules' => array('prepararFecha' => 'd/m/Y H:i')
            )
    );

    // Optionally, don't include a constructor if you don't need one.
    function __construct($id = NULL)
    {
        parent::__construct($id);
    }
    public function getFluido()
   {
       return new fluido($this->fluidos_id);
   }
}

/* End of file user_rol.php */
/* Location: ./application/models/user_rol.php */